package org.example.est.entity;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * users
 * @author 
 */
@Data

public class Users implements Serializable {
    private Long id;

    /**
     * 账号（手机号）
     */
    private String account;

    /**
     * 密码
     */
    private String password;

    /**
     * 盐
     */
    private String salt;

    /**
     * 昵称
     */
    private String username;

    /**
     * 性别（0:女,1:男,2:保密）
     */
    private Integer sex;

    /**
     * 是否实名认证（0:否,1:是）
     */
    private Integer isauthentication;

    /**
     * 真是姓名
     */
    private String name;

    /**
     * 身份证号
     */
    private String cardno;

    /**
     * 头像
     */
    private String faceurl;

    /**
     * 微信openId
     */
    private String openid;

    /**
     * 微信绑定状态（0:未绑定,1:已绑定,2:已解绑）
     */
    private Integer bindstatus;

    /**
     * 微信绑定时间
     */
    private Date bindtime;

    /**
     * 修改人
     */
    private Long updateduserid;

    /**
     * 创建时间
     */
    private Date createdtime;

    /**
     * 修改时间
     */
    private Date updatedtime;

    /**
     * 是否删除(0:否,1:是)
     */
    private Integer isdelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Users other = (Users) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAccount() == null ? other.getAccount() == null : this.getAccount().equals(other.getAccount()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
            && (this.getSalt() == null ? other.getSalt() == null : this.getSalt().equals(other.getSalt()))
            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getIsauthentication() == null ? other.getIsauthentication() == null : this.getIsauthentication().equals(other.getIsauthentication()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCardno() == null ? other.getCardno() == null : this.getCardno().equals(other.getCardno()))
            && (this.getFaceurl() == null ? other.getFaceurl() == null : this.getFaceurl().equals(other.getFaceurl()))
            && (this.getOpenid() == null ? other.getOpenid() == null : this.getOpenid().equals(other.getOpenid()))
            && (this.getBindstatus() == null ? other.getBindstatus() == null : this.getBindstatus().equals(other.getBindstatus()))
            && (this.getBindtime() == null ? other.getBindtime() == null : this.getBindtime().equals(other.getBindtime()))
            && (this.getUpdateduserid() == null ? other.getUpdateduserid() == null : this.getUpdateduserid().equals(other.getUpdateduserid()))
            && (this.getCreatedtime() == null ? other.getCreatedtime() == null : this.getCreatedtime().equals(other.getCreatedtime()))
            && (this.getUpdatedtime() == null ? other.getUpdatedtime() == null : this.getUpdatedtime().equals(other.getUpdatedtime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAccount() == null) ? 0 : getAccount().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        result = prime * result + ((getSalt() == null) ? 0 : getSalt().hashCode());
        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getIsauthentication() == null) ? 0 : getIsauthentication().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCardno() == null) ? 0 : getCardno().hashCode());
        result = prime * result + ((getFaceurl() == null) ? 0 : getFaceurl().hashCode());
        result = prime * result + ((getOpenid() == null) ? 0 : getOpenid().hashCode());
        result = prime * result + ((getBindstatus() == null) ? 0 : getBindstatus().hashCode());
        result = prime * result + ((getBindtime() == null) ? 0 : getBindtime().hashCode());
        result = prime * result + ((getUpdateduserid() == null) ? 0 : getUpdateduserid().hashCode());
        result = prime * result + ((getCreatedtime() == null) ? 0 : getCreatedtime().hashCode());
        result = prime * result + ((getUpdatedtime() == null) ? 0 : getUpdatedtime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", account=").append(account);
        sb.append(", password=").append(password);
        sb.append(", salt=").append(salt);
        sb.append(", username=").append(username);
        sb.append(", sex=").append(sex);
        sb.append(", isauthentication=").append(isauthentication);
        sb.append(", name=").append(name);
        sb.append(", cardno=").append(cardno);
        sb.append(", faceurl=").append(faceurl);
        sb.append(", openid=").append(openid);
        sb.append(", bindstatus=").append(bindstatus);
        sb.append(", bindtime=").append(bindtime);
        sb.append(", updateduserid=").append(updateduserid);
        sb.append(", createdtime=").append(createdtime);
        sb.append(", updatedtime=").append(updatedtime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}